<%@page import="java.util.HashMap"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Khutro - Control panel</title>

<link rel="stylesheet" type="text/css" href="khutro/css/khutro.css">
<link rel="stylesheet" type="text/css" href="khutro/css/jquery-ui.css">
<script type="text/javascript" src="khutro/js/jq.js"></script>
<script type="text/javascript" src="khutro/js/jq2.js"></script>
<script type="text/javascript" src="khutro/js/superfish.js"></script>
<script type="text/javascript"><!--
$(document).ready(function() {
	$('#menu > ul').superfish({
		hoverClass	 : 'sfHover',
		pathClass	 : 'overideThisToUse',
		delay		 : 0,
		animation	 : {height: 'show'},
		speed		 : 'normal',
		autoArrows   : false,
		dropShadows  : false, 
		disableHI	 : false, /* set to true to disable hoverIntent detection */
		onInit		 : function(){},
		onBeforeShow : function(){},
		onShow		 : function(){},
		onHide		 : function(){}
	});
	
	$('#menu > ul').css('display', 'block');
});
//-->
</script> 
</head>
<body>
<form action="">
	<input type="hidden" id="roleId"/>
</form>
<c:choose>

<c:when test="${userRoleIdss ==1 }">
<script language="javascript" type="text/javascript">
<!--
var dle_act_lang   = ["Yes", "No", "Enter", "Cancel"];
//-->
</script>
<div id="loading-layer"><div id="loading-layer-text">Please wait...</div></div>

<div id="container">
<div id="header">
  <div class="div1">
    <div class="div2"><img src="khutro/images/logo.png" title="Administration" onclick="location = adminloadsystem.action" alt=""></div>
        <div class="div3"><img src="./khutro/images/lock.png" alt="" style="position: relative; top: 3px;">&nbsp;Welcome:  <span><s:property value="#session['displayNamess']" /> (Administrator)</span> &nbsp; <a href="logout.action" class="navigation">Logout</a></div>
      </div>
    <div id="menu">
    <ul class="left sf-js-enabled" style="display: block; ">
      <li><a href="adminloadsystem.action" class="top">Quick Links</a>
        <ul style="display: none; visibility: hidden; ">
          <li><a href="checkaddtopic.action">Add PostNews</a></li>
          <li><a href="checkaddsharetopic.action">Add ShareNews</a></li>
          <li><a href="admin-listtopicload.action">Edit (Reviews/Approve) News</a></li>
          <li><a href="adminspamtopicdo.action">Report Topic</a></li>
          <li><a href="admin-locationload.action">Location</a></li>
        </ul>
      </li>
      <li class=""><a class="top">User Management</a>
        <ul style="visibility: hidden; display: none; ">
          <li><a href="admin-userlistload.action">Users</a></li>
          <li><a href="profileuser.action">Admin Profile </a></li>
        </ul>
      </li>
      <li class=""><a class="top" href="adminlogs.action">Activity Logs and Monitors</a>
      </li>
    </ul>
    <ul style="display: block; " class="right sf-js-enabled">
      <li><a href="adminloadsystem.action" class="top">Quick Links</a></li>
      <li style="cursor:pointer !important"><a onclick="window.open('index.action');" class="top">View Live Site</a></li>
<!--      <li><a class="top" href="/admin.jsp?action=logout">Logout</a></li> -->
    </ul>
  </div>
  </div>
<div id="content">

<table align="center" id="main_body" style="width: 98%; ">
    <tbody><tr>
        <td width="4" height="16"><img src="khutro/images/tb_left.gif" width="4" height="16" border="0"></td>
		<td background="khutro/images/tb_top.gif"><img src="khutro/images/tb_top.gif" width="1" height="16" border="0"></td>
		<td width="4"><img src="khutro/images/tb_right.gif" width="3" height="16" border="0"></td>
    </tr>
	<tr>
        <td width="4" background="khutro/images/tb_lt.gif"><img src="khutro/images/tb_lt.gif" width="4" height="1" border="0"></td>
		<td valign="top" style="padding-top:12px; padding-left:13px; padding-right:13px;" bgcolor="#FAFAFA">
		
<div style="padding-top:5px;">
<table width="100%">
    <tbody><tr>
        <td width="4"><img src="khutro/images/tl_lo.gif" width="4" height="4" border="0"></td>
        <td background="khutro/images/tl_oo.gif"><img src="khutro/images/tl_oo.gif" width="1" height="4" border="0"></td>
        <td width="6"><img src="khutro/images/tl_ro.gif" width="6" height="4" border="0"></td>
    </tr>
    <tr>
      <td><img src="khutro/images/tl_lu.gif" width="4" height="6" border="0"></td>
      <td background="khutro/images/tl_ub.gif"><img src="khutro/images/tl_ub.gif" width="1" height="6" border="0"></td>
      <td><img src="khutro/images/tl_ru.gif" width="6" height="6" border="0"></td>
    </tr>
</tbody></table>
</div>
<!--MAIN area--><script type="text/javascript">
									<!-- begin
										function popupedit(id) {
											
											var rndval = new Date().getTime();

											$('body')
													.append(
															'<div id="modal-overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #666666; opacity: .40;filter:Alpha(Opacity=40); z-index: 999; display:none;"></div>');
											$('#modal-overlay').css({
												'filter' : 'alpha(opacity=40)'
											}).fadeIn('slow');

											$("#dleuserpopup").remove();
											$("body")
													.append(
															"<div id='dleuserpopup' title='Edit user ' style='display:none'></div>");

											$('#dleuserpopup')
													.dialog(
															{
																autoOpen : true,
																width : 560,
																height : 500,
																dialogClass : "modalfixed",
																buttons : {
																	"Cancel" : function() {
																		$(this).dialog("close");
																		$(
																				"#dleuserpopup")
																				.remove();
																	},
																	"Save" : function() {

																		document
																				.getElementById('edituserframe').contentWindow.document
																				.getElementById(
																						'saveuserform')
																				.submit();

																	}
																},
																open : function(
																		event,
																		ui) {
																	$(
																			"#dleuserpopup")
																			.html(
																					"<iframe name='edituserframe' id='edituserframe' width='100%' height='400' src='edituser.action?UsersId="
																							+ id
																							+ "' frameborder='0' marginwidth='0' marginheight='0' allowtransparency='true'></iframe>");
																},
																beforeClose : function(
																		event,
																		ui) {
																	$("#dleuserpopup").html("");
																},
																close : function(
																		event,
																		ui) {
																	$('#modal-overlay').fadeOut('slow',
																					function() {
																						$('#modal-overlay').remove();
																						document.location = "admin-userlistload.action";
																					});
																}
															});

											if ($(window).width() > 830
													&& $(window).height() > 530) {
												$('.modalfixed.ui-dialog').css(
														{
															position : "fixed"
														});
												$('#dleuserpopup').dialog(
														"option", "position",
														[ '0', '0' ]);
											}

											return false;

										}

										function confirmdelete(id) {
											DLEconfirm(
													"Remove this user? ",
													"Confirm",
													function() {
														alert(id);
														//deleteusername(id);
														document.location = "admindeleteuser.action?usersId="+ id;
													});
										}
										function clearform(frm) {
											for ( var i = 0; i < frm.length; i++) {
												var el = frm.elements[i];
												if (el.type == "checkbox"
														|| el.type == "radio") {
													el.checked = 0;
													continue;
												}
												if ((el.type == "text")
														|| (el.type == "textarea")
														|| (el.type == "password")) {
													el.value = "";
													continue;
												}
												if ((el.type == "select-one")
														|| (el.type == "select-multiple")) {
													el.selectedIndex = 0;
												}
											}
											document.searchform.start_from.value = "";
										}
										function list_submit(prm) {
											document.searchform.start_from.value = prm;
											document.searchform.submit();
											return false;
										}
									// end -->
									</script>
<form action="khutro/logs.htm" method="get" name="navi" id="navi">
<div style="padding-top:5px;padding-bottom:2px;">
<table width="100%">
    <tbody><tr>
        <td width="4"><img src="khutro/images/tl_lo.gif" width="4" height="4" border="0"></td>
        <td background="khutro/images/tl_oo.gif"><img src="khutro/images/tl_oo.gif" width="1" height="4" border="0"></td>
        <td width="6"><img src="khutro/images/tl_ro.gif" width="6" height="4" border="0"></td>
    </tr>
    <tr>
        <td background="khutro/images/tl_lb.gif"><img src="khutro/images/tl_lb.gif" width="4" height="1" border="0"></td>
        <td style="padding:5px;" bgcolor="#FFFFFF">
<table width="100%">
    <tbody><tr>
        <td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">A list of all actions performed in the Admin CP for the last 30 days.</div></td>
    </tr>
</tbody></table>
<div class="unterline"></div>
<table width="100%" id="actionlist">
    <tbody><tr class="thead">
        <th width="170" style="padding:2px;">Date:</th>
        <th width="170" style="padding:2px;">User name:</th>
        <th width="130">IP:</th>
        <th>Action: </th>
    </tr>
	<tr class="tfoot"><th colspan="4"><div class="hr_line"></div></th></tr>
		<display:table id="lstActivity" name="lstActivity" pagesize="30"
					requestURI="/adminlogs.action" offset="1" style="width:100%">
					<display:column>
        <tr>
        
        <td style="padding-top:5px;padding-bottom:5px;width: 170px">${lstActivity[5]}</td>
        <td style="width: 170px">
        	<!-- <a class="maintitle" onclick="javascript:popupedit('${lstActivity[7]}'); return false;" href="javascript:void(0);">${lstActivity[2]}</a> -->
        	${lstActivity[2]}
        </td>
        <td style="width: 130px">${lstActivity[1]}</td>
        <c:choose>
        <c:when test="${lstActivity[4]==1 || lstActivity[4]==4 || lstActivity[4]==5}">
        <td>${lstActivity[6]} : <a href="detail.action?topicId=${lstActivity[3]}&districtId=${lstActivity[8]}">${lstActivity[7]}</a></td>
        </c:when>
        <c:otherwise>
        <td>${lstActivity[6]}</td>
        </c:otherwise>
        </c:choose>
        </tr>
	    <tr class=""><td background="khutro/images/mline.gif" height="1" colspan="4"></td></tr>
        </display:column>
        </display:table>
        
	    <tr class=""><td background="khutro/images/mline.gif" height="1" colspan="4"></td></tr>
        
	    <tr><td background="khutro/images/mline.gif" height="1" colspan="4"></td></tr>
        
	    <tr><td background="khutro/images/mline.gif" height="1" colspan="4"></td></tr>
        	<tr class="tfoot"><th colspan="4"><div class="hr_line"></div></th></tr>
</tbody></table>
</td>
        <td background="khutro/images/tl_rb.gif"><img src="khutro/images/tl_rb.gif" width="6" height="1" border="0"></td>
    </tr>
    <tr>
        <td><img src="khutro/images/tl_lu.gif" width="4" height="6" border="0"></td>
        <td background="khutro/images/tl_ub.gif"><img src="khutro/images/tl_ub.gif" width="1" height="6" border="0"></td>
        <td><img src="khutro/images/tl_ru.gif" width="6" height="6" border="0"></td>
    </tr>
</tbody></table>
</div>
<input type="hidden" name="mod" value="logs">
<input type="hidden" name="start_from" id="start_from" value="0">
	 <!--MAIN area-->
	<div style="height:8px; display:block"></div>

		</form></td>
		<td width="4" background="khutro/images/tb_rt.gif"><img src="khutro/images/tb_rt.gif" width="4" height="1" border="0"></td>
    </tr>
	<tr>
        <td height="16" background="khutro/images/tb_lb.gif"></td>
		<td background="khutro/images/tb_tb.gif"></td>
		<td background="khutro/images/tb_rb.gif"></td>
    </tr>
</tbody></table>

<div style="padding-bottom:10px;">
<table width="100%">
    <tbody><tr>
        <td height="40" align="center" style="padding-right:10px;background: #FAFAFA url('engine/skins/images/footer.gif') repeat-x 0 0;"><div class="navigation">Fu Team | FSH-Project<br>Copyright 2012©. All rights reserved.</div></td>
    </tr>
</tbody></table></div>	
</div>

</div>

<script language="javascript" type="text/javascript">
<!--
function getClientWidth()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}
var main_body_size = getClientWidth();

if (main_body_size > 1300) document.getElementById('main_body').style.width = "1200px";

//-->
</script>


<div id="hintbox"></div>
</c:when>
<c:otherwise>
	<c:redirect url="adminlogin.jsp"/>
</c:otherwise>
</c:choose>
</body></html>